using System;
using System.ComponentModel.DataAnnotations;
using HengTong.Model._Admin;
using HengTong.Model.Interfaces;
using WalkingTec.Mvvm.Core;

namespace HengTong.Model.Db.Other.Bill
{
    /// <summary>
    /// 访客申请记录
    /// </summary>
    [Display(Name = "访客申请", Description = "访客申请记录表单", GroupName = "访客业务表单")]
    public class SysVisitorRecordRequestBill : BaseBill, IDataPrivilegeEntity
    {
        [Required]
        [Display(Name = "访客事由ID", Description = "访客事由ID", GroupName = "访客信息")]
        public Guid? VisitorReasonId { get; set; }

        [Display(Name = "访客事由ID", Description = "访客事由ID", GroupName = "访客信息")]
        public SysVisitorReason VisitorReason { get; set; }

        [Display(Name = "姓名", Description = "访客姓名", GroupName = "访客信息")]
        [StringLength(64)]
        public string Name { get; set; }

        [Display(Name = "手机号", Description = "访客手机号", GroupName = "访客信息")]
        [StringLength(11)]
        public string Phone { get; set; }

        [Display(Name = "身份证号", Description = "访客身份证号", GroupName = "访客信息")]
        [StringLength(18)]
        public string IdCardNo { get; set; }

        [Display(Name = "身份证正面照片", Description = "身份证正面照片文件", GroupName = "身份信息")]
        public Guid? IdCardFrontPhotoId { get; set; }

        [Display(Name = "身份证正面照片", Description = "身份证正面照片文件", GroupName = "身份信息")]
        public FileAttachment IdCardFrontPhoto { get; set; }

        [Display(Name = "身份证反面照片", Description = "身份证反面照片文件", GroupName = "身份信息")]
        public Guid? IdCardBackPhotoId { get; set; }

        [Display(Name = "身份证反面照片", Description = "身份证反面照片文件", GroupName = "身份信息")]
        public FileAttachment IdCardBackPhoto { get; set; }

        [Display(Name = "所属单位/公司", Description = "访客所属单位或公司", GroupName = "访客信息")]
        [StringLength(128)]
        public string Company { get; set; }

        [Display(Name = "车牌号", Description = "访客车辆车牌号", GroupName = "访客信息")]
        [StringLength(32)]
        public string CarNo { get; set; }

        /*//微信用户，如果没有需要新增到 SysWechatUser 表中
        [Display(Name = "微信用户", Description = "关联的微信用户主键", GroupName = "其他信息")]
        public Guid? WechatUserId { get; set; }

        [Display(Name = "微信用户", Description = "关联的微信用户对象", GroupName = "其他信息")]
        public SysWechatUser WechatUser { get; set; }*/
        
        //绑定用户，先创建微信用户，如果没有需要新增到 SysWechatUser 表中
        [Display(Name = "绑定用户", Description = "关联的系统用户对象", GroupName = "系统用户绑定")]
        public FrameworkUser User { get; set; }

        [Display(Name = "绑定用户", Description = "关联的系统用户主键", GroupName = "系统用户绑定")]
        public Guid? UserId { get; set; }

        [Display(Name = "预约时间", Description = "预约时间", GroupName = "访客信息")]
        public DateTime? ReservationTime { get; set; }

        [Display(Name = "接待人", Description = "接待人姓名", GroupName = "访客信息")]
        [StringLength(64)]
        public string Receptionist { get; set; }

        [Display(Name = "接待人电话", Description = "接待人电话", GroupName = "访客信息")]
        [StringLength(20)]
        public string ReceptionistPhone { get; set; }

        [Display(Name = "拒绝原因", Description = "拒绝原因", GroupName = "访客信息")]
        [StringLength(256)]
        public string RejectReason { get; set; }

        [Display(Name = "入厂时间", Description = "入厂时间", GroupName = "访客信息")]
        public DateTime? EntryTime { get; set; }

        [Display(Name = "出厂时间", Description = "出厂时间", GroupName = "访客信息")]
        public DateTime? LeaveTime { get; set; }

        /*[Display(Name = "准入二维码", Description = "准入二维码", GroupName = "访客信息")]
        [StringLength(256)]
        public string QrCode { get; set; }*/
    }
}